<!--[if ie 6]>
      <style type="text/css">
      div#content div.buttonMinibox{width:200px;display:inline;float:none;overflow: hidden;}
      div#content div.buttonBox{width:600px;height:30px;}
      </style>
<![endif]-->

<?php
	
	echo $accessibility->whereIAm($pageTitle,array(array('title'=>'Calendário','link'=>'/calendars'),array('title'=>'Visualizar calendário')));
	echo $this->renderElement('message');
	echo "<h2 id='contentTitle'>".$pageTitle."</h2>";
	echo "<div id='view'>";
	echo "<p><label>Nome: </label><span>".$calendar['Calendar']['name']."</span></p>";
	echo "<p><label>Sigla: </label><span>".$calendar['Calendar']['shortname']."</span></p>";
	echo "<p><label>Entidade: </label><span>".$calendar['Organization']['nome']."</span></p>";
	
	/* Botoes - Inicio */
	$entity = 'calendars';
	$model = 'Calendar';
	$label = 'calendário';
	$label_plural = 'calendários';
	
	echo "<div class='buttonBox'>";
	echo "<div class='buttonMinibox'>";
	$listButton = "<span class=\"buttonList\">Listar ".$label_plural."</span>";
	echo html_entity_decode($html->link($listButton, '/'.$entity.'/',array('class'=>'button')));
	echo "</div>";
	echo "<div class='buttonMinibox'>";
	if ($othAuth->hasPermission($entity.'/edit/')) {
		$editButton = "<span class=\"buttonEdit\">Editar ".$label."</span>";
		echo html_entity_decode($html->link($editButton, '/'.$entity.'/edit/'.$calendar[$model]['id'],array('class'=>'button')));
	}
	echo "</div>";
	
	if ($othAuth->hasPermission($entity.'/delete/')) { 
		echo "<div class='buttonMinibox'>";
		if ($othAuth->hasPermission($entity.'/delete/')) {
			$deleteButton = "<span class=\"buttonDelete\">Apagar ".$label."</span>";
			echo html_entity_decode($html->link($deleteButton,'/'.$entity.'/delete/'.$calendar[$model]['id'], array('class'=>'button'), 'Confirma a exclusão deste item?'));
		}
		echo "</div>";
	}

	echo "<div class='buttonMinibox'>";
	$eventsButton = "<span class=\"\">Visualizar eventos</span>";
	echo html_entity_decode($html->link($eventsButton,'/events/calendar/'.$calendar[$model]['id'], array('class'=>'button')));
	echo "</div>";


	echo "</div>";
	

 




	/* Botoes - Fim */
	echo "<br/><br/><br/>";
	echo "</div>";
